<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>List</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.js"></script>
</head>
<body>
<div id="app">
    Web 编程语言：
    <ul>
        <li v-for="(language, index) in languages">
            {{ index }}: {{ language }}
        </li>
    </ul>
    <div>
        <input type="text" v-model="newLanguage" @keyup.enter="addLanguage"/>
    </div>
</div>

<script>
    var app = new Vue({
        el: '#app',
        data: {
            languages: [
                'PHP',
                'JavaScript',
                'Python',
                'Golang',
                'Java'
            ],
            newLanguage: '',
        },
        methods: {
            addLanguage() {
                this.languages.push(this.newLanguage);
                this.newLanguage = '';
            },
        }
    });
</script>

</body>
</html>